package com.twf.a02test;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        int n;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        n = sc.nextInt();
        for (int i = 2; i < n; i++) {
            boolean flag = true;
            for (int j = 2; j < i; j++) {
                if (i % j != 0) {
                    flag = false;
                    break;
                }
            }
           if (flag) {
                System.out.println(i);
            }
        }
    }
}
